﻿namespace WMS6.Web.CommonMethodServiceRef
{
    using System;
    using System.CodeDom.Compiler;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Runtime.CompilerServices;
    using System.Runtime.Serialization;

    [Serializable, DataContract(Name="AuditDefinitionInfo", Namespace="http://schemas.datacontract.org/2004/07/WMS6.DataEntity"), DebuggerStepThrough, GeneratedCode("System.Runtime.Serialization", "3.0.0.0")]
    public class AuditDefinitionInfo : IExtensibleDataObject, INotifyPropertyChanged
    {
        [OptionalField]
        private string ColNameField;
        [OptionalField]
        private string ColTypeField;
        [NonSerialized]
        private ExtensionDataObject extensionDataField;
        [OptionalField]
        private string ForDeleteField;
        [OptionalField]
        private string ForInsertField;
        [OptionalField]
        private string ForUpdateField;
        [OptionalField]
        private string IsPrimaryField;
        [OptionalField]
        private int RowIDField;
        [OptionalField]
        private string TableNameField;

        public event PropertyChangedEventHandler PropertyChanged;

        protected void RaisePropertyChanged(string propertyName)
        {
            PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
            if (propertyChanged != null)
            {
                propertyChanged(this, new PropertyChangedEventArgs(propertyName));
            }
        }

        [DataMember]
        public string ColName
        {
            get
            {
                return this.ColNameField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ColNameField, value))
                {
                    this.ColNameField = value;
                    this.RaisePropertyChanged("ColName");
                }
            }
        }

        [DataMember]
        public string ColType
        {
            get
            {
                return this.ColTypeField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ColTypeField, value))
                {
                    this.ColTypeField = value;
                    this.RaisePropertyChanged("ColType");
                }
            }
        }

        [Browsable(false)]
        public ExtensionDataObject ExtensionData
        {
            get
            {
                return this.extensionDataField;
            }
            set
            {
                this.extensionDataField = value;
            }
        }

        [DataMember]
        public string ForDelete
        {
            get
            {
                return this.ForDeleteField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ForDeleteField, value))
                {
                    this.ForDeleteField = value;
                    this.RaisePropertyChanged("ForDelete");
                }
            }
        }

        [DataMember]
        public string ForInsert
        {
            get
            {
                return this.ForInsertField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ForInsertField, value))
                {
                    this.ForInsertField = value;
                    this.RaisePropertyChanged("ForInsert");
                }
            }
        }

        [DataMember]
        public string ForUpdate
        {
            get
            {
                return this.ForUpdateField;
            }
            set
            {
                if (!object.ReferenceEquals(this.ForUpdateField, value))
                {
                    this.ForUpdateField = value;
                    this.RaisePropertyChanged("ForUpdate");
                }
            }
        }

        [DataMember]
        public string IsPrimary
        {
            get
            {
                return this.IsPrimaryField;
            }
            set
            {
                if (!object.ReferenceEquals(this.IsPrimaryField, value))
                {
                    this.IsPrimaryField = value;
                    this.RaisePropertyChanged("IsPrimary");
                }
            }
        }

        [DataMember]
        public int RowID
        {
            get
            {
                return this.RowIDField;
            }
            set
            {
                if (!this.RowIDField.Equals(value))
                {
                    this.RowIDField = value;
                    this.RaisePropertyChanged("RowID");
                }
            }
        }

        [DataMember]
        public string TableName
        {
            get
            {
                return this.TableNameField;
            }
            set
            {
                if (!object.ReferenceEquals(this.TableNameField, value))
                {
                    this.TableNameField = value;
                    this.RaisePropertyChanged("TableName");
                }
            }
        }
    }
}

